package com.zhijiaoyun.dao;

import com.zhijiaoyun.dao.core.IBaseDao;
import com.zhijiaoyun.model.Admin;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author shisfish
 * @date 2017/6/6
 */
public interface IAdminDao extends IBaseDao<Admin> {

    /**
     * get by account
     *
     * @param account
     * @return
     */
    Admin selectAdminByAccount(String account);

    /**
     * count by params
     *
     * @param account
     * @param username
     * @param status
     * @return
     */
    int countByParams(@Param("account") String account, @Param("username") String username,
                      @Param("status") int status);

    /**
     * page by params
     *
     * @param beginIndex
     * @param pageSize
     * @param account
     * @param username
     * @param status
     * @return
     */
    List<Admin> pageByParams(@Param("beginIndex") int beginIndex, @Param("pageSize") int pageSize,
                             @Param("account") String account, @Param("username") String username, @Param("status") int status);
}